using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for ECSConfigSection
/// </summary>
namespace SiteECSWeb
{
    public class ECSConfigSection : ConfigurationSection
    {
        [ConfigurationProperty("defaultConnectionStringName",
           DefaultValue = "SiteECSDBConnectionString")]
        public string DefaultConnectionStringName
        {
            get
            {
                return (string)base["defaultConnectionStringName"];
            }
            set
            {
                base["defaultConnectionStringName"] = value;
            }
        }

        [ConfigurationProperty("hostName",
           DefaultValue = "localhost")]
        public string HostName
        {
            get
            {
                return (string)base["hostName"];
            }
            set
            {
                base["hostName"] = value;
            }
        }

        [ConfigurationProperty("delfaultHomePage",
            DefaultValue = "~/DefaultName.aspx")]
        public string DelfaultHomePage
        {
            get
            {
                return (string)base["delfaultHomePage"];
            }
            set
            {
                base["delfaultHomePage"] = value;
            }
        }
        [ConfigurationProperty("googleAPIKey",
            DefaultValue = "")]
        public string GoogleAPIKey
        {
            get
            {
                return (string)base["googleAPIKey"];
            }
            set
            {
                base["googleAPIKey"] = value;
            }
        }
        //GoogleAPIKey
        [ConfigurationProperty("defaultCacheDuration", DefaultValue = "600")]
        public int DefaultCacheDuration
        {
            get
            {
                return (int)base["defaultCacheDuration"];

            }
            set
            {
                base["defaultCacheDuration"] = value;
            }
        }
        [ConfigurationProperty("contactForm", IsRequired = true)]
        public ContactFormElement ContactForm
        {
            get
            {
                return (ContactFormElement)base["contactForm"];
            }
        }
        [ConfigurationProperty("uploadInfo", IsRequired = true)]
        public UploadInfoElement UploadInfo
        {
            get
            {
                return (UploadInfoElement)base["uploadInfo"];
            }
        }
        [ConfigurationProperty("virtualNamesInfo", IsRequired = true)]
        public VirtualNamesElement VirtualNamesInfo
        {
            get
            {
                return (VirtualNamesElement)base["virtualNamesInfo"];
            }
        }
        [ConfigurationProperty("htmlFilesNameInfo", IsRequired = true)]
        public HtmlFilesNameElement HtmlFilesNameInfo
        {
            get
            {
                return (HtmlFilesNameElement)base["htmlFilesNameInfo"];
            }
        }
    }

    public class ContactFormElement : ConfigurationElement
    {
        [ConfigurationProperty("mailSubject", DefaultValue = "Mail from Egyptian Commercial Service: {0}")]
        public string MailSubject
        {
            get { return (string)base["mailSubject"]; }
            set { base["mailSubject"] = value; }
        }

        [ConfigurationProperty("mailTo", IsRequired = true)]
        public string MailTo
        {
            get { return (string)base["mailTo"]; }
            set { base["mailTo"] = value; }
        }

        [ConfigurationProperty("mailCC")]
        public string MailCC
        {
            get { return (string)base["mailCC"]; }
            set { base["mailCC"] = value; }
        }
    }

    public class UploadInfoElement : ConfigurationElement
    {
        [ConfigurationProperty("regExpPattern",
            DefaultValue = "(.*?)\\.(jpg|jpeg|gif|doc|docx|xls|xlsx|pdf)$")]
        public string RegExpPattern
        {
            get { return (string)base["regExpPattern"]; }
            set { base["regExpPattern"] = value; }
        }

        [ConfigurationProperty("rootAttachFolder", DefaultValue = "AttachECS")]
        public string RootAttachFolder
        {
            get { return (string)base["rootAttachFolder"]; }
            set { base["rootAttachFolder"] = value; }
        }

        [ConfigurationProperty("newsAttachFolder", DefaultValue = "newsAttach")]
        public string NewsAttachFolder
        {
            get { return (string)base["newsAttachFolder"]; }
            set { base["newsAttachFolder"] = value; }
        }
        [ConfigurationProperty("empAttachFolder", DefaultValue = "empAttach")]
        public string EmpAttachFolder
        {
            get { return (string)base["empAttachFolder"]; }
            set { base["empAttachFolder"] = value; }
        }
        [ConfigurationProperty("lcompAttachFolder", DefaultValue = "lcompAttachF")]
        public string LCompAttachFolder
        {
            get { return (string)base["lcompAttachFolder"]; }
            set { base["lcompAttachFolder"] = value; }
        }
        [ConfigurationProperty("exprtOppAttach", DefaultValue = "exprtOppAttachF")]
        public string ExprtOppAttach
        {
            get { return (string)base["exprtOppAttach"]; }
            set { base["exprtOppAttach"] = value; }
        }
        [ConfigurationProperty("tenderAttach", DefaultValue = "tenderAttachF")]
        public string TenderAttach
        {
            get { return (string)base["tenderAttach"]; }
            set { base["tenderAttach"] = value; }
        }
        [ConfigurationProperty("tradAffectSubAttach", DefaultValue = "tenderAttachF")]
        public string TradAffectSubAttach
        {
            get { return (string)base["tradAffectSubAttach"]; }
            set { base["tradAffectSubAttach"] = value; }
        }
        [ConfigurationProperty("exporterGuideAttachFolder", DefaultValue = "exporterGuideAttachF")]
        public string ExporterGuideAttachFolder
        {
            get { return (string)base["exporterGuideAttachFolder"]; }
            set { base["exporterGuideAttachFolder"] = value; }
        }
        [ConfigurationProperty("expGuidePhotoAttachFolder", DefaultValue = "expGuidePhotoAttachF")]
        public string ExpGuidePhotoAttachFolder
        {
            get { return (string)base["expGuidePhotoAttachFolder"]; }
            set { base["expGuidePhotoAttachFolder"] = value; }
        }
        [ConfigurationProperty("expGuideFileAttachFolder", DefaultValue = "expGuideFileAttachF")]
        public string ExpGuideFileAttachFolder
        {
            get { return (string)base["expGuideFileAttachFolder"]; }
            set { base["expGuideFileAttachFolder"] = value; }
        }
        [ConfigurationProperty("fairsAttachFolder", DefaultValue = "fairsAttachF")]
        public string FairsAttachFolder
        {
            get { return (string)base["fairsAttachFolder"]; }
            set { base["fairsAttachFolder"] = value; }
        }
        [ConfigurationProperty("fairsPhotoAttachFolder", DefaultValue = "fairsPhotoAttachF")]
        public string FairsPhotoAttachFolder
        {
            get { return (string)base["fairsPhotoAttachFolder"]; }
            set { base["fairsPhotoAttachFolder"] = value; }
        }
        [ConfigurationProperty("fairsFileAttachFolder", DefaultValue = "fairsFileAttachF")]
        public string FairsFileAttachFolder
        {
            get { return (string)base["fairsFileAttachFolder"]; }
            set { base["fairsFileAttachFolder"] = value; }
        }
        [ConfigurationProperty("mStudyAttachFolder", DefaultValue = "mStudAttachF")]
        public string MStudyAttachFolder
        {
            get { return (string)base["mStudyAttachFolder"]; }
            set { base["mStudyAttachFolder"] = value; }
        }
        [ConfigurationProperty("mStudPhotoAttachFolder", DefaultValue = "mStudPhotoAttachF")]
        public string MStudPhotoAttachFolder
        {
            get { return (string)base["mStudPhotoAttachFolder"]; }
            set { base["mStudPhotoAttachFolder"] = value; }
        }
        [ConfigurationProperty("mStudyFileAttachFolder", DefaultValue = "mStudyFileAttachF")]
        public string MStudyFileAttachFolder
        {
            get { return (string)base["mStudyFileAttachFolder"]; }
            set { base["mStudyFileAttachFolder"] = value; }
        }
        [ConfigurationProperty("empImgAttachFolder", DefaultValue = "empImgAttach")]
        public string EmpImgAttachFolder
        {
            get { return (string)base["empImgAttachFolder"]; }
            set { base["empImgAttachFolder"] = value; }
        }
        [ConfigurationProperty("tempUploadFolder", DefaultValue = "tempUploadFolder")]
        public string TempUploadFolder
        {
            get { return (string)base["tempUploadFolder"]; }
            set { base["tempUploadFolder"] = value; }
        }
        [ConfigurationProperty("imgEmptyPathSmall", DefaultValue = "imgEmptyPathSmall")]
        public string ImgEmptyPathSmall
        {
            get { return (string)base["imgEmptyPathSmall"]; }
            set { base["imgEmptyPathSmall"] = value; }
        }
        [ConfigurationProperty("imgEmptyPathLarge", DefaultValue = "imgEmptyPathLarge")]
        public string ImgEmptyPathLarge
        {
            get { return (string)base["imgEmptyPathLarge"]; }
            set { base["imgEmptyPathLarge"] = value; }
        }
        [ConfigurationProperty("imgEmptyBook", DefaultValue = "imgEmptyBook")]
        public string ImgEmptyBook
        {
            get { return (string)base["imgEmptyBook"]; }
            set { base["imgEmptyBook"] = value; }
        }
    }

    public class VirtualNamesElement : ConfigurationElement
    {

        [ConfigurationProperty("newsDetails", DefaultValue = "DetialsNews")]
        public string NewsDetails
        {
            get { return (string)base["newsDetails"]; }
            set { base["newsDetails"] = value; }
        }

        [ConfigurationProperty("newsEdit", DefaultValue = "newsEdit")]
        public string NewsEdit
        {
            get { return (string)base["newsEdit"]; }
            set { base["newsEdit"] = value; }
        }
      
        [ConfigurationProperty("newsArchive", DefaultValue = "NewsArchive")]
        public string NewsArchive
        {
            get { return (string)base["newsArchive"]; }
            set { base["newsArchive"] = value; }
        }
        [ConfigurationProperty("newsReport", DefaultValue = "newsReport")]
        public string NewsReport
        {
            get { return (string)base["newsReport"]; }
            set { base["newsReport"] = value; }
        }
        [ConfigurationProperty("tendersDetails", DefaultValue = "tendersDetails")]
        public string TendersDetails
        {
            get { return (string)base["tendersDetails"]; }
            set { base["tendersDetails"] = value; }
        }

        [ConfigurationProperty("tenderCountryList", DefaultValue = "tenderCountryList")]
        public string TenderCountryList
        {
            get { return (string)base["tenderCountryList"]; }
            set { base["tenderCountryList"] = value; }
        }
        [ConfigurationProperty("tendersEdit", DefaultValue = "tendersEdit")]
        public string TendersEdit
        {
            get { return (string)base["tendersEdit"]; }
            set { base["tendersEdit"] = value; }
        }
        [ConfigurationProperty("tendersReport", DefaultValue = "tendersReport")]
        public string TendersReport
        {
            get { return (string)base["tendersReport"]; }
            set { base["tendersReport"] = value; }
        }
        [ConfigurationProperty("exportOppDetails", DefaultValue = "exportOppDetails")]
        public string ExportOppDetails
        {
            get { return (string)base["exportOppDetails"]; }
            set { base["exportOppDetails"] = value; }
        }
        [ConfigurationProperty("exportOppCountryList", DefaultValue = "exportOppCountryList")]
        public string ExportOppCountryList
        {
            get { return (string)base["exportOppCountryList"]; }
            set { base["exportOppCountryList"] = value; }
        }
        [ConfigurationProperty("exportOppEdit", DefaultValue = "exportOppEdit")]
        public string ExportOppEdit
        {
            get { return (string)base["exportOppEdit"]; }
            set { base["exportOppEdit"] = value; }
        }
        [ConfigurationProperty("exportOppReport", DefaultValue = "exportOppReport")]
        public string ExportOppReport
        {
            get { return (string)base["exportOppReport"]; }
            set { base["exportOppReport"] = value; }
        }
        [ConfigurationProperty("officeDetails", DefaultValue = "officeDetails")]
        public string OfficeDetails
        {
            get { return (string)base["officeDetails"]; }
            set { base["officeDetails"] = value; }
        }
        [ConfigurationProperty("officeStics", DefaultValue = "officeStics")]
        public string OfficeStics
        {
            get { return (string)base["officeStics"]; }
            set { base["officeStics"] = value; }
        }
        [ConfigurationProperty("officeReport", DefaultValue = "officeReport")]
        public string OfficeReport
        {
            get { return (string)base["officeReport"]; }
            set { base["officeReport"] = value; }
        }
        [ConfigurationProperty("officeEdit", DefaultValue = "officeEdit")]
        public string OfficeEdit
        {
            get { return (string)base["officeEdit"]; }
            set { base["officeEdit"] = value; }
        }
        [ConfigurationProperty("embassyDetails", DefaultValue = "embassyDetails")]
        public string EmbassyDetails
        {
            get { return (string)base["embassyDetails"]; }
            set { base["embassyDetails"] = value; }
        }
        [ConfigurationProperty("embassyEdit", DefaultValue = "embassyEdit")]
        public string EmbassyEdit
        {
            get { return (string)base["embassyEdit"]; }
            set { base["embassyEdit"] = value; }
        }
        [ConfigurationProperty("companyAccountReg", DefaultValue = "companyAccountReg")]
        public string CompanyAccountReg
        {
            get { return (string)base["companyAccountReg"]; }
            set { base["companyAccountReg"] = value; }
        }
        [ConfigurationProperty("companyAccountEdit", DefaultValue = "companyAccountEdit")]
        public string CompanyAccountEdit
        {
            get { return (string)base["companyAccountEdit"]; }
            set { base["companyAccountReg"] = value; }
        }
        [ConfigurationProperty("verificationUrl", DefaultValue = "verificationUrl")]
        public string VerificationUrl
        {
            get { return (string)base["verificationUrl"]; }
            set { base["verificationUrl"] = value; }
        }

        [ConfigurationProperty("wcompanyDetails", DefaultValue = "wcompanyDetails")]
        public string WcompanyDetails
        {
            get { return (string)base["wcompanyDetails"]; }
            set { base["wcompanyDetails"] = value; }
        }
        [ConfigurationProperty("wcompanyCountryList", DefaultValue = "wcompCountryList")]
        public string WcompanyCountryList
        {
            get { return (string)base["wcompanyCountryList"]; }
            set { base["wcompanyCountryList"] = value; }
        }
        [ConfigurationProperty("wcompanyEdit", DefaultValue = "wcompanyEdit")]
        public string WcompanyEdit
        {
            get { return (string)base["wcompanyEdit"]; }
            set { base["wcompanyEdit"] = value; }
        }
        [ConfigurationProperty("mstudyDetails", DefaultValue = "mstudyDetails")]
        public string MStudyDetails
        {
            get { return (string)base["mstudyDetails"]; }
            set { base["mstudyDetails"] = value; }
        }
        [ConfigurationProperty("mstudyCountryList", DefaultValue = "mstudyCountryList")]
        public string MStudyCountryList
        {
            get { return (string)base["mstudyCountryList"]; }
            set { base["mstudyCountryList"] = value; }
        }
        [ConfigurationProperty("mstudyEdit", DefaultValue = "mstudyEdit")]
        public string MStudyEdit
        {
            get { return (string)base["mstudyEdit"]; }
            set { base["mstudyEdit"] = value; }
        }
        [ConfigurationProperty("mstudyReport", DefaultValue = "mstudyReport")]
        public string MStudyReport
        {
            get { return (string)base["mstudyReport"]; }
            set { base["mstudyReport"] = value; }
        }
        [ConfigurationProperty("fairsDetails", DefaultValue = "fairsDetails")]
        public string FairsDetails
        {
            get { return (string)base["fairsDetails"]; }
            set { base["fairsDetails"] = value; }
        }
        [ConfigurationProperty("fairsCountryList", DefaultValue = "fairsCountryList")]
        public string FairsCountryList
        {
            get { return (string)base["fairsCountryList"]; }
            set { base["fairsCountryList"] = value; }
        }
        [ConfigurationProperty("fairsEdit", DefaultValue = "fairsEdit")]
        public string FairsEdit
        {
            get { return (string)base["fairsEdit"]; }
            set { base["fairsEdit"] = value; }
        }
        [ConfigurationProperty("exporterGuideDetails", DefaultValue = "exporterGuideDetails")]
        public string ExporterGuideDetails
        {
            get { return (string)base["exporterGuideDetails"]; }
            set { base["exporterGuideDetails"] = value; }
        }
        [ConfigurationProperty("fairsReport", DefaultValue = "fairsReport")]
        public string FairsReport
        {
            get { return (string)base["fairsReport"]; }
            set { base["fairsReport"] = value; }
        }
        [ConfigurationProperty("exporterGuideCountryList", DefaultValue = "exporterGuideCountryList")]
        public string ExporterGuideCountryList
        {
            get { return (string)base["exporterGuideCountryList"]; }
            set { base["exporterGuideCountryList"] = value; }
        }
        [ConfigurationProperty("exporterGuideEdit", DefaultValue = "exporterGuideEdit")]
        public string ExporterGuideEdit
        {
            get { return (string)base["exporterGuideEdit"]; }
            set { base["exporterGuideEdit"] = value; }
        }
        [ConfigurationProperty("exporterGuideReport", DefaultValue = "exporterGuideReport")]
        public string ExporterGuideReport
        {
            get { return (string)base["exporterGuideReport"]; }
            set { base["exporterGuideReport"] = value; }
        }
        [ConfigurationProperty("employeeAccountEdit", DefaultValue = "employeeAccountEdit")]
        public string EmployeeAccountEdit
        {
            get { return (string)base["employeeAccountEdit"]; }
            set { base["employeeAccountEdit"] = value; }
        }
        [ConfigurationProperty("employeeHisDetails", DefaultValue = "employeeHisDetails")]
        public string EmployeeHisDetails
        {
            get { return (string)base["employeeHisDetails"]; }
            set { base["employeeHisDetails"] = value; }
        }
        [ConfigurationProperty("employeeHisReport", DefaultValue = "employeeHisReport")]
        public string EmployeeHisReport
        {
            get { return (string)base["employeeHisReport"]; }
            set { base["employeeHisReport"] = value; }
        }
        [ConfigurationProperty("inquiryEdit", DefaultValue = "inquiryEdit")]
        public string InquiryEdit
        {
            get { return (string)base["inquiryEdit"]; }
            set { base["inquiryEdit"] = value; }
        }
        [ConfigurationProperty("tradAffectSubDetails", DefaultValue = "TradAffectSubDetails")]
        public string TradAffectSubDetails
        {
            get { return (string)base["tradAffectSubDetails"]; }
            set { base["tradAffectSubDetails"] = value; }
        }

        [ConfigurationProperty("tradAffectSubEdit", DefaultValue = "tradAffectSubEdit")]
        public string TradAffectSubEdit
        {
            get { return (string)base["tradAffectSubEdit"]; }
            set { base["tradAffectSubEdit"] = value; }
        }
        [ConfigurationProperty("tradAffectSubReport", DefaultValue = "tradAffectSubReport")]
        public string TradAffectSubReport
        {
            get { return (string)base["tradAffectSubReport"]; }
            set { base["tradAffectSubReport"] = value; }
        }
        [ConfigurationProperty("tradAffectSubCountryList", DefaultValue = "tradAffectSubCountryList")]
        public string TradAffectSubCountryList
        {
            get { return (string)base["tradAffectSubCountryList"]; }
            set { base["tradAffectSubCountryList"] = value; }
        }
        [ConfigurationProperty("authHeadEdit", DefaultValue = "authHeadEdit")]
        public string AuthHeadEdit
        {
            get { return (string)base["authHeadEdit"]; }
            set { base["authHeadEdit"] = value; }
        }
        [ConfigurationProperty("authHeadReport", DefaultValue = "authHeadReport")]
        public string AuthHeadReport
        {
            get { return (string)base["authHeadReport"]; }
            set { base["authHeadReport"] = value; }
        }
        [ConfigurationProperty("authorEdit", DefaultValue = "authorEdit")]
        public string AuthorEdit
        {
            get { return (string)base["authorEdit"]; }
            set { base["authorEdit"] = value; }
        }
        [ConfigurationProperty("authorReport", DefaultValue = "authHeadReport")]
        public string AuthorReport
        {
            get { return (string)base["authHeadReport"]; }
            set { base["authHeadReport"] = value; }
        }
        [ConfigurationProperty("depDetails", DefaultValue = "depDetails")]
        public string DepDetails
        {
            get { return (string)base["depDetails"]; }
            set { base["depDetails"] = value; }
        }
        [ConfigurationProperty("depEdit", DefaultValue = "depEdit")]
        public string DepEdit
        {
            get { return (string)base["depEdit"]; }
            set { base["depEdit"] = value; }
        }
        [ConfigurationProperty("depStics", DefaultValue = "depStics")]
        public string DepStics
        {
            get { return (string)base["depStics"]; }
            set { base["depStics"] = value; }
        }
    }

    public class HtmlFilesNameElement : ConfigurationElement
    {

        [ConfigurationProperty("toFriend", DefaultValue = "ToFriend.htm")]
        public string ToFriend
        {
            get { return (string)base["toFriend"]; }
            set { base["toFriend"] = value; }
        }
        [ConfigurationProperty("newAccount", DefaultValue = "newAccount.htm")]
        public string NewAccount
        {
            get { return (string)base["newAccount"]; }
            set { base["newAccount"] = value; }
        }

        [ConfigurationProperty("newAccountEdit", DefaultValue = "newAccount.htm")]
        public string NewAccountEdit
        {
            get { return (string)base["newAccountEdit"]; }
            set { base["newAccountEdit"] = value; }
        }
        [ConfigurationProperty("recoverPwd", DefaultValue = "recoverPwd.htm")]
        public string RecoverPwd
        {
            get { return (string)base["recoverPwd"]; }
            set { base["recoverPwd"] = value; }
        }
        [ConfigurationProperty("inquiryAnswer", DefaultValue = "inquiryAnswer.htm")]
        public string InquiryAnswer
        {
            get { return (string)base["inquiryAnswer"]; }
            set { base["inquiryAnswer"] = value; }
        }
    }
}


